package com.ruoyi.basedata.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

import com.ruoyi.basedata.domain.UsageRange;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 用量区间设置Mapper接口
 *
 * @author TsingYu
 * @date 2024-07-13
 */
@Mapper
public interface UsageRangeMapper extends BaseMapper<UsageRange> {
    /**
     * 查询用量区间设置
     *
     * @param tenantId       用量区间设置主键
     * @param warnTargetType 报警对象类型
     * @return 用量区间设置
     */
    List<UsageRange> selectUsageRangeByTenantId(@Param("tenantId") String tenantId, @Param("warnTargetType") String warnTargetType);

    /**
     * 批量新增或修改用量区间设置
     *
     * @param usageRangeList 用量区间设置
     * @return 结果
     */
    int insertOrUpdateUsageRangeBatch(@Param("usageRangeList") List<UsageRange> usageRangeList);
}
